/**
 * Copyright(c) 2014 Xunton Solutions
 *
 * History:
 *   15-10-8 下午12:43 Created by dwzhang
 */
package com.jade.bss.weixin.impl;

import java.util.Map;

import com.jade.bss.weixin.WeixinApp;
import com.jade.bss.weixin.WeixinAppConfig;

/**
 * 通过配置实现的APP Config.
 *
 * @author <a href="mailto:dwzhang@xunton.com">dwzhang</a> 
 * @version 1.0 15-10-8 下午12:43
 */

public class SimpleAppConfig implements WeixinAppConfig
{
    protected Map<String, WeixinApp> appMap;
    protected WeixinApp defaultApp;

    public void setAppMap(Map<String, WeixinApp> appMap)
    {
        this.appMap = appMap;
    }

    public void setDefaultApp(WeixinApp defaultApp)
    {
        this.defaultApp = defaultApp;
    }

    public WeixinApp getDefaultApp()
    {
        return defaultApp;
    }

    public WeixinApp getApp(String code)
    {
        return appMap.get(code);
    }

//    public WeixinApp getAppById(String appid)
//    {
//        return null;  //To change body of implemented methods use File | Settings | File Templates.
//    }
}
